import { Router } from 'express';
import * as Controller from '../api/controllers/role.controller';

const router = Router();

router
  .route('/')
  .get(
    Controller.getRoles
  );

router
  .route('/:id')
  .get(
    Controller.getRoleById
  );

router
  .route('/')
  .post(
    Controller.addRole
  );

router
  .route('/:id')
  .put(
    Controller.updateRoleById
  );

router
  .route('/:id')
  .delete(
    Controller.deleteRoleById
  );

export default router;